Ext.define('Jason.view.protal.module.systemManager.monitor.login.MainView', {
    extend: 'Wys.basic.BaseView',
    xtype: 'systemManager_exception_login',
    itemId: 'systemManager_exception_login',
    requires: [
        'Jason.store.ReqUrl',
        'Ext.grid.plugin.RowExpander',
        'Jason.view.protal.module.systemManager.monitor.ViewModel',
        'Jason.store.protal.module.systemManager.monitor.log.LoginLogsStore'
    ],
    viewModel: { type: 'monitor_login_ViewModel' },
    enabledRightMenu: true,
    enabledMark: false,
    bind: '{sysLoginLogsStore}',
    listeners: {
        afterrender: function (grid) {
            Ext.defer(function () {
                var store = Ext.StoreManager.lookup('sysLoginLogsStore');
                store.load();
            }, 100);
        }
    },
    columns: [
        { xtype: 'rownumberer', text: '序号', align: 'center', width: 50 },
        { text: '应用名', dataIndex: 'appName', flex: .1, menuDisabled: true },
        { text: '服务名', dataIndex: 'serverName',flex:.1},
        { text: '运行环境', dataIndex: 'env', width:80, menuDisabled: true },
        { text: '登录IP',dataIndex:'visitorIp',width:100,},
        { text: '登录用户', dataIndex:'loginUser',width:120},
        { text: '登录时间',dataIndex:'loginTime', xtype: 'datecolumn', format: 'Y-m-d H:i', width: 130 }
    ],
    dockedItems: [{
        xtype: 'pagingtoolbar',
        bind: 'sysLoginLogsStore',
        enabledMoreOpt: true,
        dock: 'bottom'
    }, {
        xtype: 'toolbar',
        dock: 'top',
        items: [{
            xtype: 'gridsearchfield',paramName:'requestUri'
        }, '->', {
            xtype: 'exportbutton', rightCode: 'DLRZ',
            modularText: '用户登录日志'
        },{
            xtype: 'refresh', viewItemId: '#systemManager_exception_login',
            rightCode: 'DLRZ'
        }
        ]
    }]
});